package com.zy.xuanwo.acitivity;

import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.zy.xuanwo.R;
import com.zy.xuanwo.application.MyApplication;
import com.zy.xuanwo.utils.UserInfoSPManager;
import com.zy.xuanwo.view.TitleView;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * 账号管理
 * Created by njb on 2016/7/10.
 */
public class AccountManagementActivity extends AppCompatActivity implements View.OnClickListener {


    @Bind(R.id.title_layout)
    TitleView titleLayout;
    @Bind(R.id.username_tv)
    TextView usernameTv;
    @Bind(R.id.message_center_next_iv)
    EditText messageCenterNextIv;
    @Bind(R.id.username_rl)
    RelativeLayout usernameRl;
    @Bind(R.id.message_center_view)
    View messageCenterView;
    @Bind(R.id.password_tv)
    TextView passwordTv;
    @Bind(R.id.edt_iv)
    EditText edtIv;
    @Bind(R.id.password_rl)
    RelativeLayout passwordRl;
    @Bind(R.id.update_password_tv)
    TextView updatePasswordTv;
    @Bind(R.id.update_password_edit)
    ImageView updatePasswordEdit;
    @Bind(R.id.update_password_rl)
    RelativeLayout updatePasswordRl;
    @Bind(R.id.update_password_view)
    View updatePasswordView;
    @Bind(R.id.left_sliding_menu_iv)
    ImageView mBack;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_account_management);
        ButterKnife.bind(this);
        initView();
    }

    private void initView() {
        messageCenterNextIv.setText(UserInfoSPManager.getUserName());
        String password = "123456";
        edtIv.setText(password);
    }

    @OnClick({R.id.update_password_rl,R.id.left_sliding_menu_iv})
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.update_password_rl:
                startActivity(new Intent(AccountManagementActivity.this, UpdatePasswordActivity.class));
                this.finish();
                break;
            case R.id.left_sliding_menu_iv:
                AccountManagementActivity.this.finish();
                break;
            default:
                break;
        }
    }
}
